<template>
  <common-nav
    :menueItems="menueItems"
    :titleCN="titleCN"
    :titleEn="titleEn"
  ></common-nav>
</template>

<script>
import CommonNav from '../../components/view/CommonNav.vue'
export default {
  data() {
    return {
      menueItems: [
        // { index: "1", name: "实验报告", router: { name: "experimentalReport" } },
        {
          index: '1',
          name: '实验报告',
          router: { name: 'experimentalRecord' }
        },
        { index: '2', name: '实验课程', router: { name: 'experimentCourse' } },
        {
          index: '3',
          name: '实验答疑',
          router: { name: 'experimentalAnswer' }
        },
        {
          index: '4',
          name: '实验评价与建议',
          router: { name: 'experimentalAdvice' }
        }
      ],
      titleCN: '实验数据',
      titleEn: 'EXPERIMENTAL DATE'
    }
  },
  components: {
    CommonNav
  },
  mounted() {
    if (this.$store.state.user.roleId === 1) {
      this.menueItems[2].name = '答疑管理'
      this.menueItems.push({
        index: '6',
        name: '用户管理',
        router: { name: 'userManagement' }
      })
    }
  }
}
</script>

<style></style>
